struct Student{
    name: String,
    age: u32,
    id: u32,
}

impl Student {
    fn summary(&self) -> String {
        format!("I am {} with id {}, {} years old", self.name, self.id, self.age)
    }
}

impl Student {
    fn inc_age(&mut self) -> u32 {
        self.age += 1;
        self.age
    }
}

fn main() {
    let mut stu = Student {
        name: String::from("Z"),
        age: 24,
        id: 0
    };
    println!("summary: {}", stu.summary());
    stu.inc_age();
    println!("summary: {}", stu.summary());
}


